package secret

import (
	"math/rand"
	"time"
)

const s string = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"
const size int = 62

func init() {
	rand.Seed(time.Now().UnixNano())
}

func GenerateCaptchaComplex() string {
	var sliceRes []byte
	for i := 0; i < 6; i++ {
		sliceRes = append(sliceRes, s[rand.Intn(size)])
	}
	return string(sliceRes)
}

func GenerateCaptchaSimple() int {
	return rand.Intn(900000) + 100000
}
